<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="./lib/layui/css/layui.css" />
    <link rel="stylesheet" href="./css/cropper.css" />
    <link rel="stylesheet" href="./css/add_article.css" />
  </head>
  <body>
    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
      <ul class="layui-tab-title">
        <li class="layui-this">基础信息</li>
        <li>SEO信息</li>
        <li>文章内容</li>
      </ul>
      <div class="layui-tab-content">
        <form class="layui-form" lay-filter="form-addArt" id="addArticle">
          <div class="layui-tab-item layui-show">
            <div class="layui-form-item">
              <label class="layui-form-label">标题</label>
              <div class="layui-input-block">
                <input type="text" name="title" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input" />
              </div>
            </div>
            <div class="layui-form-item">
              <div class="layui-inline">
                <label class="layui-form-label">作者</label>
                <div class="layui-input-block">
                  <input type="text" name="author" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input" />
                </div>
              </div>
              <div class="layui-inline">
                <label class="layui-form-label">分类</label>
                <div class="layui-input-inline">
                  <select name="cateid" lay-verify="required" lay-filter="cate_select">
                    <!-- <option value=""></option>
                    <option value="0">北京</option>
                    <option value="1">上海</option>
                    <option value="2">广州</option>
                    <option value="3">深圳</option>
                    <option value="4">杭州</option> -->
                  </select>
                </div>
              </div>
            </div>
            <div class="layui-form-item">
              <div class="layui-inline">
                <label class="layui-form-label">阅读次数</label>
                <div class="layui-input-block read">
                  <span class="decrease">-</span>
                  <span class="increase">+</span>
                  <input type="text" name="click" required lay-verify="required" value="1" autocomplete="off" class="layui-input readTimes" />
                </div>
              </div>
              <div class="layui-inline">
                <!-- 注意：这一层元素并不是必须的 -->
                <label class="layui-form-label">创建时间</label>
                <div class="layui-input-block">
                  <input type="text" name="create_date" class="layui-input" autocomplete="off" placeholder="选择日期时间" id="test" />
                </div>
              </div>
            </div>
            <div class="layui-form-item">
              <div class="layui-inline">
                <label class="layui-form-label">是否推荐</label>
                <div class="layui-input-block ishot">
                  否
                  <input type="checkbox" name="ishot" lay-skin="switch" />
                  是
                </div>
              </div>
              <div class="layui-inline">
                <label class="layui-form-label">是否置顶</label>
                <div class="layui-input-block istop">
                  否
                  <input type="checkbox" name="istop" lay-skin="switch" />
                  是
                </div>
              </div>
            </div>
            <div class="layui-form-item">
              <div class="layui-inline">
                <label class="layui-form-label">收藏数量</label>
                <div class="layui-input-block">
                  <input type="text" name="lovenum" required lay-verify="required" placeholder="请输入收藏数量名称" autocomplete="off" class="layui-input" />
                </div>
              </div>
            </div>
            <div class="layui-form-item">
              <div class="layui-inline">
                <label class="layui-form-label">文章缩略图</label>
                <div class="layui-input-block">
                  <button type="button" class="layui-btn layui-btn-normal layui-btn-sm btnUpload">点击上传</button>
                  <input type="file" accept="image/jpeg,image/png" style="display: none" />
                  <input type="hidden" name="pic" />
                  <div class="imgPreview">
                    <div class="img">
                      <img src="" alt="" />
                    </div>
                    <p style="cursor: pointer">点击查看详情</p>
                    <i class="layui-icon layui-icon-close"></i>
                  </div>
                </div>
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">文章标签</label>
              <div class="layui-input-block tags">
                <!-- <input type="checkbox" name="tags" title="写作" lay-skin="primary" checked />
                <input type="checkbox" name="" title="发呆" lay-skin="primary" />
                <input type="checkbox" name="" title="发呆" lay-skin="primary" />
                <input type="checkbox" name="" title="发呆" lay-skin="primary" />
                <input type="checkbox" name="" title="发呆" lay-skin="primary" />
                <input type="checkbox" name="" title="发呆" lay-skin="primary" /> -->
              </div>
            </div>
          </div>
          <div class="layui-tab-item">
            <div class="layui-form-item layui-form-text">
              <label class="layui-form-label">seo关键字</label>
              <div class="layui-input-block">
                <textarea name="keywords" lay-verify="required" placeholder="请输入seo关键字名称" class="layui-textarea"></textarea>
              </div>
            </div>
            <div class="layui-form-item layui-form-text">
              <label class="layui-form-label">seo的描述</label>
              <div class="layui-input-block">
                <textarea name="description" lay-verify="required" placeholder="请输入seo的描述" class="layui-textarea"></textarea>
              </div>
            </div>
          </div>
          <div class="layui-tab-item">
            <div class="layui-form-item">
              <!-- 左侧的 label -->
              <label class="layui-form-label">文章内容</label>
              <!-- 为富文本编辑器外部的容器设置高度 -->
              <div class="layui-input-block" style="height: 400px">
                <!-- 重要：将来这个 textarea 会被初始化为富文本编辑器 -->
                <textarea name="content" id="content"></textarea>
              </div>
            </div>
          </div>

          <div class="layui-form-item">
            <div class="layui-input-block btns">
              <button class="layui-btn layui-btn-sm btn-pub" lay-submit lay-filter="formDemo"><i class="layui-icon layui-icon-add-1"></i>立即发布</button>
              <button class="layui-btn layui-btn-normal layui-btn-sm btn-save" lay-submit><i class="layui-icon layui-icon-file"></i>保存草稿</button>
              <button class="layui-btn layui-btn-warm layui-btn-sm btn-back"><i class="layui-icon layui-icon-return"></i>返回列表</button>
            </div>
          </div>
        </form>
      </div>
    </div>
    <script src="./lib/layui/layui.all.js"></script>
    <script src="./js/jquery.js"></script>
    <script src="./lib/tinymce/tinymce.min.js"></script>
    <script src="./lib/tinymce/tinymce_setup.js"></script>
    <!-- <script src="/js/Cropper.js"></script> -->
    <!-- <script src="/js/jquery-cropper.js"></script> -->
    <script src="./js/axios.js"></script>
    <script src="./js/baseAPI.js"></script>
    <script src="./js/add_article.js"></script>
  </body>
</html>
